import { Bk_News_Category } from 'src/news_category/bk_news_category.entity';
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';

@Entity()
export class Bk_News {
    @PrimaryGeneratedColumn()
    id: number;

    @Column()
    order_number: number;

    @Column()
    news_title: string;

    @Column({ type: 'text' })
    news_content: string;

    @Column({ type: 'text' })
    news_contentText: string;

    @Column({ default: new Date().valueOf() })
    date_added: string;

    @Column()
    thumbnail_path: string

    @ManyToOne(() => Bk_News_Category, category => category.news)
    category: Bk_News_Category[];
}